/* 
 * File:   NonResidentStudent.cpp
 * Author: Allison
 * 
 * Created on October 17, 2013, 5:18 PM
 */

#include "NonResidentStudent.h"

NonResidentStudent::NonResidentStudent(string firstName, string lastName, string studentID, bool res, double rate, double fee) :
Student(firstName, lastName, studentID, res, rate){
    this->fee = fee;
}

NonResidentStudent::~NonResidentStudent() {
}

void NonResidentStudent::setFee(double fee) {
    this->fee = fee;
}

double NonResidentStudent::getFee() const {
    return fee;
}

void NonResidentStudent::computeTuition() {
    double tuition;
    if (computeCreditNum() >= creditUpperbound)
        tuition = rate * creditUpperbound + fee;
    else
        tuition = rate * computeCreditNum() + fee;
    setTuitionAmount(tuition);
}

